<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
<%@ include file="../include/top.jsp"%>
<%@ include file="../include/errorArea.jsp"%>
<script src="${baseURL}/js/LodopFuncs.js"></script>
<object id="LODOP_OB" classid="" width=0 height=0> 
    <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
</object>
<script type="text/javascript">
var LODOP;
function CreateOneFormPage(code,createTime){
	$.get('${ctx}/printInfoAction/printSmallBill/'+code,function(data, textStatus) {
		if(textStatus == 'success') {
			LODOP=getLodop(document.getElementById('LODOP_OB'),document.getElementById('LODOP_EM'));  
			//var strStyleCSS="<link href='${ctx}/css/PrintSample10.css' type='text/css' rel='stylesheet'>";
			//var strFormHtml=strStyleCSS+"<table>"+document.getElementById("aa").innerHTML+"</table>";
			//LODOP.ADD_PRINT_TEXT(50,231,260,39,"");
			LODOP.SET_PRINT_PAGESIZE(3,480,25,"");
			LODOP.SET_PRINT_STYLE("FontSize",18);
			LODOP.SET_PRINT_STYLE("Bold",1);
			LODOP.ADD_PRINT_TEXT(0,0,0,0,"");
			LODOP.ADD_PRINT_HTM(30,5,480,600,data);
			LODOP.PREVIEW();
			//LODOP.ADD_PRINT_URL(5,5,"100%","100%","listDy");
		}
	});
}
function clickSS(){
	document.getElementById("Image8").click(); 
}
</script>
</head>
<body>
<div class='adduser'>
	<div class='adduser-left'><div class='adduser-icon'></div><span>小票打印</span></div>
</div>
<form action="${baseURL}/printInfoAction/printSmallBillList" method="post" id="listSumbitInfo">
<div class='querycondition'>
	<div class='condtiontitle'><div class='searchcondition'></div>搜索条件：</div>
	<div class='condtion'>
		<input name="image" style="display:none" type="image" id="Image8" onmouseover="MM_swapImage('Image8','','${baseURL}/images/button_ss_a.jpg',1)" onmouseout="MM_swapImgRestore()" src="${baseURL}/images/button_ss.jpg"/>
		<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
			 <tr>
   				<td>
			  	订单时间：<input onclick="calendar.show(this);" id="dingdanshijian" name="dingdanshijian" value="${dingdanshijian}"/>
			  	<input type='button' value='搜索'  class='button cyan medium' onclick="clickSS();"></input>&nbsp;&nbsp;
  				</td>
  			</tr>
		</table>
	</div>
</div>
</form>
<c:if test="${empty obj.list}">
<div align="center"><b>没有符合条件的记录。</b></div>
</c:if>
<c:if test="${not empty obj.list}">
<div class='userlist-title'>
	<div class='userlist-title-left'><div class='userlist-title-icon'></div><span>列表</span></div>
</div>
<div class='userlist'>
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="0" id="listTable">
 <tr class='userlist-tr-title'>
		<td class='userlist-td operation' height="25" width="5%"><input type="checkbox" onclick="selectAll(this.checked);"></td>
		<td class='userlist-td operation' width="35%">服务站名称</td>
		<td class='userlist-td operation' width="25%">订单编号</td>
		<td class='userlist-td operation' width="25%">订单时间</td>
		<td class='userlist-td operation'>操作</td>
	</tr>
	<c:forEach var="oneRow" items="${obj.list}">
		<tr align="center">
			<td class='userlist-td operation'><input name="chk" type="checkbox" id="chk" value="${oneRow.id}" /></td>
			<td class='userlist-td operation'>${oneRow.communityName}</td>
			<td class='userlist-td operation'>${oneRow.code}</td>
			<td class='userlist-td operation'>${oneRow.createTime}</td>
			<td class='userlist-td operation'>
				<a href="#" onclick="CreateOneFormPage('${oneRow.code}');">[打印预览]</a>
			</td>
		</tr>
	</c:forEach>
       
</table>
<table>
<tr>
    <td height="5" colspan="2">
    	<%-- <input name="button" type="button" onclick="editByIds('${ctx}');" value="批量审核" class='button cyan medium'></td> --%>
  </tr>
  <tr>
    <td height="25" colspan="2"><%@ include file="../include/listpage.jsp"%>
    </td>
  </tr>
</table>
</div>
</c:if>
</body>
</html>